import {
    createApp
} from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import {
    Button,
    Icon,
    Swipe,
    SwipeItem,
    Form,
    Field,
    CellGroup,
} from 'vant'
import 'lib-flexible/flexible'
import { ActionBar, ActionBarIcon, ActionBarButton } from 'vant';
const app = createApp(App)
app.use(ActionBar);
app.use(ActionBarIcon);
app.use(ActionBarButton);

// 全局过滤器
// 在全局配置文件上挂在一个filters对象
app.config.globalProperties.$filters = {
    prefix(url) {
        if (url && url.startsWith("http")) {
            return url
        } else {
            url = `http://47.99.134.126:28019${url}`
            return url
        }
    },
}



app.use(Icon).use(Button).use(Swipe).use(SwipeItem).use(Form).use(Field).use(CellGroup).use(store).use(router).mount('#app')